<html>
    <head>
        <title>联动选择 年月日 demo</title>
    </head>
    <body>
        <div>
            <select id="select-year"></select>
            <select id="select-month"></select>
            <select id="select-day"></select>
        </div>
        <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.min.js"></script>
        <script type="text/javascript" src="./cascade-date.js"></script>
        <script>
            $(function (){
                new CascadeDate({
                    selected:null,
                    advanceYear:0,
                    delayYear:2,
                    yearSelector:'#select-year',
                    monthSelector:'#select-month',
                    daySelector:'#select-day',
                    onInstalled:function(obj){
                        console.log(obj);
                    },
                    onChangeYear:function(obj){
                        console.log(obj.year);
                    },
                    onChangeMonth:function(obj){
                        console.log(obj.month);
                    },
                    onChangeDay:function(obj){
                        console.log(obj.day);
                    },
                    onChange:function(obj,event){
                        console.log(obj,event);
                    },
                });
            });
        </script>
    </body>
</html>